/*
 * @(#)PropertiesUtil.java Aug 15, 2007
 * 
 * Copyright 2007 by ChinanetCenter Corporation.
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * ChinanetCenter Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with ChinanetCenter.
 * 
 */
package com.cnc.bas.util;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 * @author ����
 * @date   Aug 15, 2007
 * @version 1.0
 */
public class  PropsUtil {
	static ResourceBundle rb1 = ResourceBundle.getBundle("I18N", new Locale("en"));
	static ResourceBundle rb2 = ResourceBundle.getBundle("I18N", new Locale("zh","CN"));
	
	public static String getProperty(Locale locale,String key){
	   if(locale.getLanguage().equals("zh"))
		   return rb2.getString(key).trim();
	    else
	    	return rb1.getString(key).trim();
	}
	

}